package com.qf.sy2103.ssm.vo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MessageVo {

    private String statusCode; // 状态码 比如user模块的 1001 代码代表登录成功，1002代表登录失败

    private String message; // 服务器段返回的消息

    private Object data; // 返回的具体的业务数据
    public static MessageVo ok(String userCodeResitSuccess, String userMsgResitSuccess, Object o) {
        return new MessageVo(userCodeResitSuccess,userMsgResitSuccess,o);
    }

    public static MessageVo error(String userCodeResitFail, String userMsgResitFail, Object o) {
        return new MessageVo(userCodeResitFail,userMsgResitFail,o);
    }
}
